import { fontConfig } from '../commonSetting';

export default {
  config: [
    {
      name: '默认设置',
      code: 'base',
      children: [
        {
          name: '气泡位置',
          code: 'direction',
          value: 'out',
          type: 'Radio',
          enumValue: [
            { key: '目的地', value: 'out' },
            { key: '出发地', value: 'in' },
          ],
        },
        {
          name: '气泡尺寸最小值',
          code: 'minSize',
          value: 5,
          min: 1,
          max: 100,
          type: 'InputNumber',
          unit: 'px',
        },
        {
          name: '气泡尺寸最大值',
          code: 'maxSize',
          value: 10,
          min: 1,
          max: 100,
          type: 'InputNumber',
          unit: 'px',
        },
        {
          name: '填充颜色',
          code: 'color',
          type: 'ColorSelector',
          value: '#24D7BD',
        },
      ],
    },
    {
      name: '提示框设置',
      code: 'tooltip',
      children: [
        {
          code: 'show',
          value: 'hide',
          type: 'Radio',
          enumValue: [
            {
              key: '无提示',
              value: 'hide',
            },
            {
              key: '鼠标划过提示',
              value: 'hover',
            },
          ],
        },
        fontConfig,
        {
          name: '边框线条粗细',
          code: 'borderWidth',
          min: 0,
          value: 1,
          type: 'InputNumber',
          unit: 'px',
        },
        {
          name: '边框线条色',
          code: 'borderColor',
          value: '#3399CC',
          type: 'ColorSelector',
        },
        {
          name: '背景颜色',
          code: 'backgroundColor',
          value: '#369',
          type: 'ColorSelector',
        },
      ],
    },
  ],
  data: {
    field: [
      { name: 'from', mapper: 'from' },
      { name: 'to', mapper: 'to' },
      { name: 'labels', mapper: 'labels' },
      { name: 'value', mapper: 'size' },
      { name: 'tooltip', mapper: 'tooltip', optional: true },
    ],
    type: 1,
    value: JSON.stringify([
      {
        labels: '北京,新疆',
        from: '116.404844,39.91405',
        to: '84.9023,42.148',
        size: 10,
        tooltip: '我是tooltip',
      },
      {
        labels: '北京,西藏',
        from: '116.404844,39.91405',
        to: '87.8695,31.6846',
        size: 15,
        tooltip: '我是西藏',
      },
      {
        labels: '北京,内蒙古',
        from: '116.404844,39.9140',
        to: '112.5977,41.3408',
        size: 20,
        tooltip: '我是内蒙古',
      },
      {
        labels: '北京,四川',
        from: '116.404844,39.91405',
        to: '101.9199,30.1904',
        size: 15,
        tooltip: '我是四川',
      },
      {
        labels: '北京,黑龙江',
        from: '116.404844,39.91405',
        to: '126.1445,48.7156',
        size: 10,
        tooltip: '我是黑龙江',
      },
    ]),
  },
  height: 0,
  width: 0,
  series: [],
  seriesDefault: [],
  name: '飞线层',
  coordinate: {
    y: 0,
    x: 0,
  },
  code: 'custom_map_group_flyline',
  version: '1.0.0',
};
